package com.itheima.service.impl;

import com.itheima.mapper.UserDao;
import com.itheima.pojo.User;
import com.itheima.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserDao userDao;

    /**
     * 根据用户名查询用户
     * @param username
     * @return
     */
    @Override
    public User getByUsername(String username) {
        User user = userDao.getByUsername(username);
        return user;
    }
}
